package com.thinkgem.jeesite.modules.tb_goods.web;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.thinkgem.jeesite.common.web.BaseController;
import com.thinkgem.jeesite.modules.tb_goods.entity.TbGoods;
import com.thinkgem.jeesite.modules.tb_goods.service.TbGoodsService;

/**
 * 货物接口控制器
 * @author zhang
 *
 */
@Controller
@RequestMapping("app/goods/")
public class GoodsAppController extends BaseController{
	
	@Autowired
	TbGoodsService goodsService;
	
	/**
	 * APP货物列表接口
	 * @param req
	 * @return
	 */
	@RequestMapping("list")
	@ResponseBody
	public Map<String,Object> goodList(HttpServletRequest req){
		List<TbGoods> result;
		try{
			result = goodsService.findList(new TbGoods());
		}catch(Exception e){
			return returnError(">>>APP货物列表异常", e);
		}
		return returnSuccess(result);
	}
	
	
	
}
